import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class test {
    public static void main(String[] args) {
        //构造一个空的LinkedList
        List<Integer> list = new LinkedList<>();
        List<String> list1 = new LinkedList<>();
        list1.add("hello");
        list.add(666);
        System.out.println(list);
        System.out.println(list1);
    }

    public static void main2(String[] args) {
        List<Integer> list = new LinkedList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        System.out.println(list);
        System.out.println(list.contains(1));
    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();

        myLinkedList.creatList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(5);
        myLinkedList.display();
        System.out.println(myLinkedList.size());
        System.out.println(myLinkedList.contains(1));
        myLinkedList.addLast(666);
        myLinkedList.display();
        myLinkedList.addIndex(666,3);
        myLinkedList.display();
        myLinkedList.display();
        myLinkedList.removeAll(666);
        myLinkedList.display();
        System.out.println("==");
        myLinkedList.clear();
        myLinkedList.display();
        System.out.println("==");

    }
}
